From 992fd9b0ee46b3818c345ba8ed1e92f4a6b1c868 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Thu, 27 Sep 2007 16:26:34 -0600 Subject: [PATCH] [IA64] Kexec: Zap VHPT in relocate_kernel On XEN do_ia64_purge_tlb unpins the VHPT entry, so it seems logical that relocate_kernel should do the same thing. It seems to work, but is it correct? Signed-off-by: Simon Horman --- xen/arch/ia64/xen/machine_kexec.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xen/arch/ia64/xen/machine_kexec.c b/xen/arch/ia64/xen/machine_kexec.c index c4f11ce8f9..666dbc967a 100644 --- a/xen/arch/ia64/xen/machine_kexec.c +++ b/xen/arch/ia64/xen/machine_kexec.c @@ -12,12 +12,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -29,7 +31,8 @@ typedef asmlinkage NORET_TYPE void (*relocate_new_kernel_t)( unsigned long pal_addr, unsigned long cpu_data_pa, unsigned long kernel_start, - unsigned long page_offset) + unsigned long page_offset, + unsigned long vhpt) ATTRIB_NORET; #define kexec_flush_icache_page(page) \ @@ -55,6 +58,7 @@ static void ia64_machine_kexec(struct unw_frame_info *info, void *arg) __va(image->reboot_code_buffer); unsigned long cpu_data_pa = (unsigned long) __pa(cpu_data(smp_processor_id())); + unsigned long vhpt; int ii; /* Interrupts aren't acceptable while we reboot */ @@ -79,10 +83,12 @@ static void ia64_machine_kexec(struct unw_frame_info *info, void *arg) while (ia64_get_ivr() != IA64_SPURIOUS_INT_VECTOR) ia64_eoi(); platform_kernel_launch_event(); + vhpt = __va_ul(vcpu_vhpt_maddr(current)); + BUG_ON(!vhpt); rnk = (relocate_new_kernel_t)&code_addr; (*rnk)(image->indirection_page, image->start_address, ia64_boot_param, GRANULEROUNDDOWN((unsigned long) pal_vaddr), cpu_data_pa, - KERNEL_START, PAGE_OFFSET); + KERNEL_START, PAGE_OFFSET, vhpt); BUG(); } -- 2.30.2